<?php if(is_object($demand) && count($items)): ?>
  <?php slot('documentType', 'Zapotrzebowanie') ?>
  <?php slot('documentTitle', $demand->getNumber()) ?>
  <?php slot('documentAuthorName', $demand->getUser()) ?>
  <?php slot('documentAuthorEmail', $demand->getUser()->getEmail()) ?>
  <?php slot('documentAuthorNumber', $demand->getUser()->getNumber()) ?>
  <?php slot('documentAuthorMobile', $demand->getUser()->getMobile()) ?>
  <?php slot('documentItemsRows') ?>
    <tr>
      <td id="small_header" width="30">Lp</td>
      <td id="small_header" width="250">Nazwa</td>
      <td id="small_header">Ilość</td>
      <td id="small_header">J.m.</td>
      <td id="small_header">Uwagi</td>
    </tr>
  <?php $counter = 1; ?>
    <?php foreach($items as $item): ?>
    <tr>
      <td id="align_center"><?php echo $counter++; ?></td>
      <td><?php echo $item['name'] ?></td>
      <td id="align_center"><?php echo $item['quantity']  ?></td>
      <td id="align_center"><?php echo $item['quantityUnit']  ?></td>
      <td id="align_center"><?php echo $item['annotation']  ?></td>
    </tr>
    <?php endforeach; ?>
  <?php end_slot() ?>
<?php else: ?>
    <?php slot('documentError', 'Brak dokumentu.') ?>
<?php endif; ?>
